
/*keep all your jquery methods inside this function  to prevent running your jquery code before document loads*/
$(document).ready(function() {

	$("input#school-login-reset").click(function() {
		$('form').clearForm();
	});

	/* Clears form */
	$.fn.clearForm = function() {
		return this.each(function() {
			var type = this.type, tag = this.tagName.toLowerCase();
			if (tag == 'form')
				return $(':input', this).clearForm();
			if (type == 'text' || type == 'password' || tag == 'textarea')
				this.value = '';
			else if (type == 'checkbox' || type == 'radio')
				this.checked = false;
			else if (tag == 'select')
				this.selectedIndex = -1;
		});
	};

	// $("#stateSelector").click(function() {
		// alert("I am an alert box!");
		// });

	});

function getXMLHttpRequestObject() {
	var xmlhttp;
	if (window.XMLHttpRequest) {
		/* code for IE7+, Firefox, Chrome, Opera, Safari */
		xmlhttp = new XMLHttpRequest();
	} else {
		/* code for IE6, IE5 */
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	return xmlhttp;
}




